export const divisionHundred = (num: number) => {
  return (num / 100).toFixed(2)
}
export const multiplicationHundred = (num: number) => {
  return Number((num * 100).toFixed(0))
}
export const transformPercent = (num: number) => {
  return Number((num * 100).toFixed(0)) + '%'
}
//获取当前日期函数
export const getTodayDateAndTime = () => {
  let date = new Date(),
    year = date.getFullYear(), //获取完整的年份(4位)
    month: number | string = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
    strDate: number | string = date.getDate(), // 获取当前日(1-31)
    hour = date.getHours(),
    minute = date.getMinutes()
  if (month < 10) month = `0${month}` // 如果月份是个位数，在前面补0
  if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数，在前面补0
  return [ `${year}-${month}-${strDate}`, `${hour}:${minute}:00` ];
}

export const isEmptyFillLine = (value: any) => {
  if (value === undefined || value === null) return '-';
  return value;
}

export const isNumber =(num: string) => {
	return /^[0-9]+.?[0-9]*$/.test(num);
}